package ui.topic;

import entity.domain.value.Value;

import javax.swing.*;
import java.awt.*;

public class TopicPanel extends JPanel{

    private JLabel lbl_topicName;
    protected Value value;
    private double topicWeigh;

    public TopicPanel(){}

    public TopicPanel(String topicName, double topicWeigh){
        lbl_topicName = new JLabel(topicName+"("+topicWeigh+")");
        this.setLayout(new FlowLayout());
        this.setOpaque(false);
        this.setBorder(BorderFactory.createLineBorder(Color.black));
        this.add(lbl_topicName);
    }

    public JLabel getLbl_topicName() {
        return lbl_topicName;
    }

    public void setLbl_topicName(JLabel lbl_topicName) {
        this.lbl_topicName = lbl_topicName;
    }

    public Value getValue() {
        return value;
    }

    public double getTopicWeigh() {
        return topicWeigh;
    }

    public void setTopicWeigh(double topicWeigh) {
        this.topicWeigh = topicWeigh;
    }
}
